﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data;
using GheSofa.Models;

namespace GheSofa.Controllers
{
    public class HomeController : Controller
    {
        GheSofaEntities db = new GheSofaEntities();
        //List<> danhsach = new List<BIZ_sach>();
        //public void danhsachsach()
        //{
        //    danhsach = BIZ_sach.Select_sach();
        //}

        public ActionResult TrangChu()
        {
            //danhsachsach();
            //List<BIZ_sach> listsach = new List<BIZ_sach>();
            //listsach = (from s in danhsach orderby s.ngaycapnhat descending select s).Take(6).ToList();
            var listSanPham = (from p in db.SanPhams orderby p.MaSP select p).Take(6).ToList();
            return View(listSanPham);
        }

        public ActionResult TuyenDung()
        {
            return View();
        }

        public ActionResult GioiThieu()
        {
            return View();
        }

        public ActionResult CuaHang()
        {
            return View();
        }
    }
}
